import com.auctionhaus.Customer
import com.auctionhaus.Listing
import com.auctionhaus.Bid


class BootStrap {

    def init = {
//        def customerList = []
//        for (c in 0..24){
//            customerList.add(new Customer(emailAddress: "email${c}@gmail.com", password: "abcdefg", date:new Date()).save(flush:true))
//
//        }
//
//        //customerList.each() {cust -> println "${cust.emailAddress}" };
//
//        def listingList = []
//        for (l in 0..24){
//            def s = Customer.findByEmailAddress("email${l}@gmail.com")
//            println "Found ${s?.emailAddress}"
//            listingList.add( new Listing(listName:"ListItem ${l}",
//                                endDateTime:new Date(), startBidPrice:1, seller:s).save(flush:true) )
//        }




        //listingList.each() {listing -> println "${listing.listName}  ${listing.seller.emailAddress}" };
    }
    def destroy = {
    }
}
